package cc.grapevine.vps.util;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class NetWorkUtil
{
	/**
	 * 如果有网络   返回true  其他返回false 
	 * @return
	 */
	public static boolean isLive(Context c) {
		NetworkInfo info = ((ConnectivityManager) c
				.getSystemService(Context.CONNECTIVITY_SERVICE))
				.getActiveNetworkInfo();
		if (null == info || !info.isConnected()) {
			return false;
		}
		return true;
	}
}